<template>
  <div class="Content" v-infinite-scroll="loadMore"
       infinite-scroll-distance="10">
    <div class="Box" v-for="item in resdatail">
      <div class="Boxuplist">
        <div class="upimgbox">
          <div class="upimgborder">
            <img :src="item.firstsrc" alt="">
          </div>
        </div>
        <div class="uptextlist">
          <p>{{item.uptexton}}</p>
          <p>{{item.uptextoff}}</p>
          <div class="Gflag">
            {{item.idnum}}
          </div>
          <div class="todatail">
            <router-link :to="{path:'/common/datail',query:{firstsrc:item.firstsrc,
              title:item.uptexton,imgone:item.downonesrc,imgtwo:item.downtwosrc,
              imgtre:item.downtresrc,textone:item.downonetexton+item.downonetext,
              texttwo:item.downtwotexton+item.downtwotext,texttre:item.downtretexton+item.downtretext
              }}"> + </router-link>
          </div>
        </div>
      </div>
      <div class="Boxdownlist">
        <div class="downBox">
          <div>
            <img :src="item.downonesrc" alt="">
          </div>
          <div class="downtext">
            <p>{{item.downonetexton}}</p>
            <p>{{item.downonetext}}</p>
          </div>
        </div>
        <div class="downBox">
          <div>
            <img :src="item.downtwosrc" alt="">
          </div>
          <div class="downtext">
            <p>{{item.downtwotexton}}</p>
            <p>{{item.downtwotext}}</p>
          </div>
        </div>
        <div class="downBox noneborder">
          <div>
            <img :src="item.downtresrc" alt="">
          </div>
          <div class="downtext">
            <p>{{item.downtretexton}}</p>
            <p>{{item.downtretext}}</p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    name: "Content",
    data: function () {
      return {
        'resdatail': []
      }
    },
    mounted: function () {
      this.$http.get('static/datalist.json').then(function (response) {
        this.resdatail=response.data.datail
      },function (response) {
      })
    },
    methods: {
      loadMore: function () {
        this.$http.get('static/datalist.json').then(function (response){
          this.resdatail.push(response.data.datatest)
        },function (res){
        })
      }
    }
  }
</script>
<style>
  .Content {
    padding: 20px;
  }
  a {
    text-decoration: none;
    color: #EAB9B2;
    /*display: inline-block;*/
    /*width: 100%;*/
  }
  .Box{
    border: 1px darkgrey solid;
    height: 115px;
    width: 100%;
    border-radius: 30px;
    box-shadow:-5px 0 5px #F0F0F0, /*左边阴影*/
    5px 0 5px #F0F0F0, /*右边阴影*/
    0 -5px 5px #F0F0F0, /*顶部阴影*/
    0 5px 5px #F0F0F0; /*底边阴影*/
    margin-bottom: 30px;
  }
  .Boxuplist{
    height: 54%;
    border-bottom: 1px solid darkgrey;
    display: flex;
    justify-content: space-between;
  }
  .uptextlist{
    width: 100%;
    text-align: left;
    /*padding: 2% 2%;*/
    font-size: 16px;
    position: relative;
  }
  .uptextlist>p:nth-child(2){
    color: #F76C41;
    /*margin-top: 10px;*/
    margin-top: -20px;
  }
  .todatail{
    width: 30px;
    height: 30px;
    background-color: #E26537;
    border-radius: 50%;
    color: white;
    text-align: center;
    line-height: 30px;
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 18px;
  }
  .upimgbox{
    width: 25%;
    height: 100%;
    position: relative;
  }
  .upimgborder{
    background-color: white;
    border: 1px black solid;
    border-radius: 50%;
    position: absolute;
    left: -14px;
    top: -9px;
    padding: 4px 4px 0 4px;
  }
  .upimgborder img{
    height: 60px;
    width: 60px;
    border-radius: 50%;
  }
  .Gflag{
    height: 26px;
    width: 21px;
    background: url("../../static/images/course-img/qizhi.png");
    background-size: cover;
    position: absolute;
    color: white;
    text-align: center;
    right: 30px;
    top: -4px;
    line-height: 18px;
    font-size: 12px;
  }
  .Boxdownlist{
    height: 36%;
    width: 92%;
    padding: 2% 4%;
    display: flex;
    justify-content: space-between;
  }
  .downBox{
    width: 29.5%;
    height: 100%;
    /*border: 1px black solid;*/
    display: flex;
    border-right: 1px solid darkgrey;
    justify-content: space-between;
    padding-left: 10px;
  }
  .downBox img{
    height: 25px;
    width: 25px;
    margin-top: 5px;
  }
  .downtext{
    width: 75%;
    padding: 5px 0 0 5px;
    text-align: left;
    font-size: 10px;
  }

  .downtext p{
    margin: 0;
  }
  .noneborder{
    border: none;
  }
  .animation{
    position: fixed;
    bottom: 0;
    left: 45%;
  }
  .animation img {
    height: 70px;
    width: 70px;
  }
</style>
